<template>
	<!-- allow-clear placeholder-->
	<!-- {{inputV}} -->
  <a-input v-input:customize="inputV" data-rule="/\s+/g" :placeholder="placeholder" v-model:value="inputV" type="text">
   <template #prefix>
	   <slot name="prefix"></slot>
     <!-- <svg-icon icon-class="查询,默认" class="icon"></svg-icon> -->
    </template>
  </a-input>
</template>

<script lang="ts" setup>
	import { ref, watch } from "vue";
	
	const inputV = ref('');
	
	const PROPS = defineProps({
		modelV:{
			type:String,
			default:()=>''
		},
		placeholder:{
			type:String,
			default:()=>''
		}
	});
	const EMITS = defineEmits(['submit'])
	
	watch(()=>inputV.value, ()=>{
		EMITS('submit', inputV.value);
	},{ deep:true });
	
	watch(()=>PROPS.modelV,()=>{
		inputV.value = JSON.parse(JSON.stringify(PROPS.modelV));
	},{ immediate:true,deep:true });
</script>

<style lang="less" scoped>
	// .ant-input-affix-wrapper {
	//   border: 1.5px solid #8E8E8E;
	//   border-radius: 6px;
	//   padding:0 10px;
	// }
</style>